<template>
  <div class="network-test-container">
    <global-todo-item></global-todo-item>
    <div class="network-test-header">这里是网络测试页面</div>
    <div class="network-test-sub-header" v-text="sub_title"></div>

  </div>

</template>

<script>
  export default {
    data() {
      return {
        sub_title: "这里是一个测试文本"
      };
    },
    methods: {},

    onLoad() {
      this.http.get("/hello")
        .then((d) => {
          console.log("请求成功:", d);
          this.sub_title = `your openid is ${d.data.openid}`;
        }).catch(e => {
        console.log("请求失败", e);
        this.sub_title = `message is ${e.message}  and status code is ${e.status}`;
      });
    }
  };
</script>

<style scoped>

  .network-test-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
  }

</style>
